package com.czj.service.impl;

import com.czj.dao.FindMapper;
import com.czj.model.Find;
import com.czj.service.FindService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FindServiceImpl implements FindService {

    @Autowired
    private FindMapper findMapper;

    @Override
    public List<Find> list(Integer pageSize, Integer pageNum) {
        PageHelper.startPage(pageNum,pageSize);
        return findMapper.list();
    }

    @Override
    public Find getItem(Integer id) {
        return findMapper.getItem(id);
    }

    @Override
    public boolean updateConut(Find find) {
        return findMapper.updateCount(find);
    }
}
